/*
 * Package: org.grassfield.common.dao
 * FileName: SystemConfigDAO.java
 *  
 * Created by pandian on Jan 28, 2011
 */
package dao;

import java.util.List;

import bean.SystemConfig;



public class SystemConfigDAO extends BaseDAO implements ISystemConfigDAO {

	@SuppressWarnings("unchecked")
	@Override
	public List<SystemConfig> list() {
		return super.list("from SystemConfig order by param");
	}

	@Override
	public SystemConfig getValue(String param) {
		List<Object> list = super.list("from SystemConfig s where s.param = ? order by param", new String[]{param});
		if (list.isEmpty())
			return null;
		return (SystemConfig) list.get(0);
	}

}
